<%@ page language="java" pageEncoding="utf-8"%>

<script>
	var movieName = "${param.movieName}".decodeUriParam();
	var memberId;
	function goMember(){
				location = "memberPhoto?id="+memberId;
	} 
	$(function()
	{
		if(movieName)
		{
			$("#txtMovieName").val(movieName);
		}
		
		var param = {reqUrl : "login"};
	
		ajaxRequest(param, function(returnData)
		{
			if(returnData.hasMember == "true")
			{
				memberId=returnData.memberId;
				var memberName = returnData.memberName;
				var memberGender = returnData.memberGender;
				var msg = "欢迎您：" + memberName  + (memberGender == 1 ? "先生" : "女士");
				
				$("#spLoginMsg").text(msg);
				$("#divLoginT").show();
				$("#divLoginF").hide();
				
			}
		}, null);
	});
	
	search = function()
	{
		var movieName = $("#txtMovieName").val().trim();
			
		if("请输入影片名称查询场次" == movieName)
		{
			movieName = "";	
		}
	
		location.href = "index.jsp?movieName=" + movieName.encodeUriParam();
	}
</script>

<div id="header">	
	<div id="header_menu">
		<div id="header_menu_left">
			<a href="index.jsp">海峰电影</a>
		</div>
	
		<div id="header_menu_right">
			<div id="divLoginF">
				<a href="register.jsp">注册</a>
				
				<span>|</span>
				
		        <a href="login.jsp">登录</a>
			</div>
			
			<div id="divLoginT" style="display:none;">
				<span id="spLoginMsg"></span>
				
				<span>|</span>
				
		        <a href="exit">退出</a>
		        
		        <span>|</span>
				
		          <a onclick="goMember()">用户中心</a>
			</div>
	        
	        <span>|</span>
	        
	        <a>帮助中心</a>
		</div>
	</div>

<div id="look" style="height:78;width:100%;	z-index:2;">
	<div id="header_middle">
		<div id="header_middle_left">
			<marquee id="marquee" behavior="alternate" direction="right">
				
			</marquee>	
		</div>
		
			<div id="header_middle_right">
				<input type="text" id="txtMovieName" value="请输入影片名称查询场次" onfocus="if (this.value == '请输入影片名称查询场次') {this.value = '';this.style.color = 'black';}" onblur="if (this.value == '' || this == 0) {this.style.color = 'gray';this.value = '请输入影片名称查询场次';}" style="width:200px; color:gray; margin:5px;"/>
				<input type="button" value="搜索" style="vertical-align: middle;" onclick="search()"/>
			</div>
		</div>
	</div>

	<div id="header_bottommenu">
		<a href="index.jsp">首页</a>
		
		<span>|</span>
		
		<a href="time.jsp">放映时刻表</a>
	</div>
</div>
<script language=javascript>
Message="海峰影院";
MFirst=5;
Text="";

function RoundMessage()
{
    MFirst=MFirst-0.05;
    for (I=0;I<Message.length;I++){
        MFirst1=MFirst+0.5*I;
        Cosine=Math.cos(MFirst1);
        RM=document.all("L"+I);
        RM.style.left=260+100*Math.sin(MFirst1)+50;
        RM.style.zIndeI=30*Cosine;
        RM.style.fontSize=40+25*Cosine;
        RM.style.color="rgb("+ (200+Cosine*80+50) + ","+ (120+Cosine*80+50) + ",0)";
    }
}
Time=window.setInterval("RoundMessage()",100);
</script>

<script type="text/javascript">

for (I=0;I<Message.length;I++)
{  
	Text=Text + '<DIV Id=L' + I + ' STYLE="width:5;font-family: Courier New;font-weight:bold;position:absolute;font-size:50px;top:30px;margin-left:-50px;color:blue">' + Message.charAt(I) + '</DIV>';
}
document.write (Text);

</script> 